package org.amphiprion.descentv2assistant.entity;

import java.text.MessageFormat;

public class Ability extends Entity {
	private String name;
	private boolean flash;
	private boolean action;

	public Ability(String id) {
		super(id);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isFlash() {
		return flash;
	}

	public void setFlash(boolean flash) {
		this.flash = flash;
	}

	public boolean isAction() {
		return action;
	}

	public void setAction(boolean action) {
		this.action = action;
	}

	public Ability parseAbility(String param) {
		Ability a = new Ability(id);
		a.name = MessageFormat.format(name.replaceAll("'", "''"), param);
		return a;
	}

}
